package com.springboot.util;

import com.springboot.bean.Code;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

public class CodeHelper {

    private static List<Code> list = null;

    private static List<Code> initList() {
        if (list != null && !list.isEmpty())
            return list;
        list = new ArrayList<>(256);

        list.add(Code.getCode("DAF", "DE F", "DEF", "Deposits Attached Fouling X %", "Deposits Attached Fouling #1", 0.5, 1.0, "SCG", "Fouling", "Service", "23"));
        list.add(Code.getCode("DAFJ", "", "DE F (J)", "Deposits Attached Fouling at Joint", "Deposits Attached Fouling #1", 10.0, 5.0, "SCG", "Fouling", "Service", "23"));
        list.add(Code.getCode("DAG", "DE G", "DEG", "Deposits Attached Grease X %", "Deposits Attached Grease #1", 0.5, 1.0, "SCG", "Grease", "Service", "23"));
        list.add(Code.getCode("DAGJ", "", "DE G (J)", "Deposits Attached Grease at Joint", "Deposits Attached Grease at Joint #1", 10.0, 5.0, "SCG", "Grease", "Service", "23"));
        list.add(Code.getCode("DAZ", "DE Z", "DEZ+", "Deposits Attached Others", "Deposits Attached Others #1", 0.5, 1.0, "SCG", "Fouling", "Service", "235"));
        list.add(Code.getCode("DAZJ", "", "DE Z (J)+", "Deposits Attached Others at Joint", "Deposits Attached Others at Joint #1", 1.0, 2.0, "SCG", "Fouling", "Service", "235"));
        list.add(Code.getCode("DEC", "DE C", "DEC", "Deposits Settled Hard / Compacted X %", "Deposits Settled Hard / Compacted #1", 0.5, 1.0, "SCG", "Compacted", "Service", "3"));
        list.add(Code.getCode("DECJ", "", "DE C (J)", "Deposits Settled Hard / Compacted at Joint >20%", "Deposits Settled Hard / Compacted at Joint #1", 8.0, 4.0, "SCG", "Compacted", "Service", "3"));
        list.add(Code.getCode("DER", "DE R", "DER", "Deposits Settled Coarse X %", "Deposits Settled Coarse #1", 1.0, 1.0, "SCG", "Coarse", "Service", "3"));
        list.add(Code.getCode("DES", "DE S", "DES", "Deposits Settled Debris / silt X %", "Deposits Settled Debris / silt #1", 0.5, 1.0, "SCG", "Silt", "Service", "3"));
        list.add(Code.getCode("DESJ", "", "DE S (J)", "Deposits Settled Debris / silt at Joint >75%", "Deposits Settled Debris / silt at Joint #1", 10.0, 5.0, "SCG", "Silt", "Service", "3"));
        list.add(Code.getCode("DEZ", "DE X", "DEZ+", "Deposits Settled Others X %", "Deposits Settled Others #1", 1.0, 1.0, "SCG", "Coarse", "Service", "35"));
        list.add(Code.getCode("DEZJ", "", "", "Deposits Settled Others at Joint", "Deposits Settled Others at Joint #1", 10.0, 5.0, "SCG", "Deposits", "Service", "35"));
        list.add(Code.getCode("EH", "DE E-1", "DEE-1", "Encrustation Heavy >20% area loss", "Encrustation Heavy, >20% cross section area loss", 10.0, 5.0, "SCG", "Encrustation", "Service", "23"));
        list.add(Code.getCode("EHJ", "", "", "Encrustation Heavy At Joint", "Encrustation Heavy at Joint", 10.0, 5.0, "SCG", "Encrustation", "Service", "23"));
        list.add(Code.getCode("EM", "DE E-2", "DEE-2", "Encrustation Medium 5%-20% area loss", "Encrustation Medium, 5%-20% cross section area loss", 5.0, 4.0, "SCG", "Encrustation", "Service", "23"));
        list.add(Code.getCode("EMJ", "", "", "Encrustation Medium At Joint", "Encrustation Medium at Joint", 7.0, 4.0, "SCG", "Encrustation", "Service", "23"));
        list.add(Code.getCode("EL", "DE E-3", "DEE-3", "Encrustation Light <5% area loss", "Encrustation Light, <5% cross section area loss", 1.0, 2.0, "SCG", "Encrustation", "Service", "23"));
        list.add(Code.getCode("ELJ", "", "", "Encrustation Light At Joint", "Encrustation Light at Joint", 1.0, 2.0, "SCG", "Encrustation", "Service", "23"));
        list.add(Code.getCode("ESH", "", "", "Scale Heavy >20% thickness loss", "Scale Heavy >20% thickness loss", 10.0, 5.0, "SCG", "Scale", "Service", "23"));
        list.add(Code.getCode("ESM", "", "", "Scale Medium 5%-20% thickness loss", "Scale Medium 5%-20% thickness loss", 5.0, 4.0, "SCG", "Scale", "Service", "23"));
        list.add(Code.getCode("ESL", "", "", "Scale Light <5% thickness loss", "Scale Light <5% thickness loss", 1.0, 2.0, "SCG", "Scale", "Service", "23"));
        list.add(Code.getCode("ID", "I D", "ID", "Infiltration Dripper", "Infiltration Dripper", 1.5, 2.0, "SCG", "Infiltration", "Service", "125"));
        list.add(Code.getCode("IDJ", "", "I D (J)", "Infiltration Dripper at Joint", "Infiltration Dripper at Joint", 1.5, 2.0, "SCG", "Infiltration", "Service", "125"));
        list.add(Code.getCode("IG", "I G", "IG", "Infiltration Gusher", "Infiltration Gusher", 10.0, 5.0, "SCG", "Infiltration", "Service", "125"));
        list.add(Code.getCode("IGJ", "", "I G (J)", "Infiltration Gusher at Joint", "Infiltration Gusher at Joint", 10.0, 5.0, "SCG", "Infiltration", "Service", "125"));
        list.add(Code.getCode("IR", "I R", "IR", "Infiltration Runner", "Infiltration Runner", 5.0, 4.0, "SCG", "Infiltration", "Service", "125"));
        list.add(Code.getCode("IRJ", "", "I R (J)", "Infiltration Runner at Joint", "Infiltration Runner at Joint", 5.0, 4.0, "SCG", "Infiltration", "Service", "125"));
        list.add(Code.getCode("IS", "I S", "IS", "Infiltration Seeper", "Infiltration Seeper", 1.0, 2.0, "SCG", "Infiltration", "Service", "125"));
        list.add(Code.getCode("ISJ", "", "I S (J)", "Infiltration Seeper at Joint", "Infiltration Seeper at Joint", 1.5, 2.0, "SCG", "Infiltration", "Service", "125"));
        list.add(Code.getCode("LVD", "", "CUD", "Loss of Vision - Debris / Silt", "Loss of Vision, Debris / Silt", 0.0, 0.0, "Misc", "Loss of Vision", "Service", ""));
        list.add(Code.getCode("LVS", "CU S", "CUS", "Loss of Vision - Steam", "Loss of Vision, Steam", 1.0, 2.0, "Misc", "Loss of Vision", "Service", "5"));
        list.add(Code.getCode("LVW", "CU W", "CW", "Loss of Vision - Camera Under water", "Loss of Vision, Camera Under water", 0.0, 0.0, "Misc", "Loss of Vision", "Service", "5"));
        list.add(Code.getCode("LVZ", "CU Z", "CUZ+", "Loss of Vision - Other", "Loss of Vision, Other", 0.0, 0.0, "Misc", "Loss of Vision", "Service", ""));
        list.add(Code.getCode("OBB", "OB B", "OBB", "Obstacles - Brick / Masonry X %", "Obstacles - Brick / Masonry #1", 10.0, 5.0, "SCG", "-", "Service", "123"));
        list.add(Code.getCode("OBC", "OB C", "OBC", "Obstacles - Through Connection or Junction X %", "Obstacles - Through Connection / Junction #1", 10.0, 5.0, "SCG", "Obstacles", "Service", "123"));
        list.add(Code.getCode("OBI", "OB I", "OBI", "Obstacles - Protruding Through Wall X %", "Obstacles - Protruding Through Wall #1", 10.0, 5.0, "SCG", "Obstacles", "Service", "13"));
        list.add(Code.getCode("OBM", "OB M", "OBM", "Obstacles - Pipe Material Lying in Invert X %", "Obstacles - Pipe Material Lying in Invert #1", 10.0, 5.0, "SCG", "Obstacles", "Service", "123"));
        list.add(Code.getCode("OBP", "OB P", "OBP", "Obstacles - External Pipe / Cable X %", "Obstacles - External Pipe / Cable #1", 10.0, 5.0, "SCG", "Obstacles", "Service", "123"));
        list.add(Code.getCode("OBS", "OB S", "OBS", "Obstacles - Built into Structure X %", "Obstacles - Built into Structure #1", 10.0, 5.0, "SCG", "Obstacles", "Service", "123"));
        list.add(Code.getCode("OBZ", "OB Z", "OBZ+", "Obstacles - Other %", "Obstacles - Other #1", 10.0, 5.0, "SCG", "Obstacles", "Service", "1235"));
        list.add(Code.getCode("RF", "R F", "RF", "Roots Fine", "Roots Fine", 1.0, 2.0, "SCG", "Roots", "Service", "25"));
        list.add(Code.getCode("RFJ", "", "R F (J)", "Roots Fine at Joint", "Roots Fine at Joint", 1.0, 2.0, "SCG", "Roots", "Service", "25"));
        list.add(Code.getCode("RM", "R M", "RM", "Roots Mass X %", "Roots Mass #1", 2.0, 3.0, "SCG", "Roots", "Service", "13"));
        list.add(Code.getCode("RMJ", "", "R M (J)", "Roots Mass at Joint > 50%", "Roots Mass at Joint #1", 15.0, 5.0, "SCG", "Roots", "Service", "13"));
        list.add(Code.getCode("RT", "R T", "RT", "Roots Tap (>10mm)", "Roots Tap (>10mm)", 4.0, 3.0, "SCG", "Roots", "Service", ""));
        list.add(Code.getCode("RTJ", "", "R T (J)", "Roots Tap at Joint", "Roots Tap at Joint", 5.0, 4.0, "SCG", "Roots", "Service", ""));

        list.add(Code.getCode("B", "B", "B", "Broken Pipe", "Broken Pipe", 80.0, 4.0, "ICG", "Broken", "Structure", "2"));
        list.add(Code.getCode("BJ", "", "B(J)", "Broken Pipe at Joint", "Broken Pipe at Joint", 120.0, 4.0, "ICG", "Broken", "Structure", "2"));
        list.add(Code.getCode("CC", "C C", "CC", "Crack Circumferential", "Crack Circumferential", 5.0, 1.0, "ICG", "Crack", "Structure", "2"));
        list.add(Code.getCode("CCJ", "", "CC(J)", "Crack Circumferential at Joint", "Crack Circumferential at Joint", 40.0, 2.0, "ICG", "Crack", "Structure", "2"));
        list.add(Code.getCode("CL", "C L", "CL", "Crack Longitudinal", "Crack Longitudinal", 5.0, 1.0, "ICG", "Crack", "Structure", "1"));
        list.add(Code.getCode("CLJ", "", "CL(J)", "Crack Longitudinal at Joint", "Crack Longitudinal at Joint", 40.0, 3.0, "ICG", "Crack", "Structure", "1"));
        list.add(Code.getCode("CM", "C M", "CM", "Cracks Multiple (Complex* / Helical*)", "Cracks Multiple (Complex* / Helical*)", 20.0, 2.0, "ICG", "Crack", "Structure", "2"));
        list.add(Code.getCode("CMJ", "", "CM(J)", "Cracks Multiple at Joint", "Cracks Multiple at Joint", 40.0, 3.0, "ICG", "Crack", "Structure", "2"));
        list.add(Code.getCode("CS", "C S", "CS", "Crack Spiral", "Crack Spiral", 20.0, 2.0, "ICG", "Crack", "Structure", "2"));
        list.add(Code.getCode("CSJ", "", "CS(J)", "Crack Spiral at Joint", "Crack Spiral at Joint", 60.0, 3.0, "ICG", "Crack", "Structure", "2"));
        list.add(Code.getCode("CX", "", "", "Connection Defect", "Connection Defect, Dia. #2", 80.0, 4.0, "ICG", "-", "Structure", "14"));
        list.add(Code.getCode("DH", "D H", "DH", "Deformation Horizontal ≤5%", "Deformation Horizontal #1", 40.0, 3.0, "ICG", "Deformation", "Structure", "3"));
        list.add(Code.getCode("DV", "D V", "DV", "Deformation Vertical ≤5%", "Deformation Vertical #1", 40.0, 3.0, "ICG", "Deformation", "Structure", "3"));
        list.add(Code.getCode("DB", "DB", "DB", "Displaced Bricks Single", "Displaced Bricks Single", 40.0, 3.0, "ICG", "-", "Structure", "12"));
        list.add(Code.getCode("DI", "DI", "DI", "Dropped Invert - Gap in mm", "Dropped Invert - Gap #2", 60.0, 3.0, "ICG", "-", "Structure", "4"));
        list.add(Code.getCode("DZ", "", "", "Deformation Other Obstacles - External Pipe / Cable %", "Deformation Other #1", 40.0, 3.0, "ICG", "Deformation", "Structure", "35"));
        list.add(Code.getCode("EX", "EX", "EX", "Exfiltration", "Exfiltration", 80.0, 4.0, "ICG", "-", "Structure", "1"));
        list.add(Code.getCode("EXJ", "", "EX(J)", "Exfiltration at Joint", "Exfiltration at Joint", 120.0, 4.0, "ICG", "-", "Structure", "12"));
        list.add(Code.getCode("FC", "F C", "FC", "Fracture Circumferential", "Fracture Circumferential", 40.0, 3.0, "ICG", "Fractured", "Structure", "2"));
        list.add(Code.getCode("FCJ", "", "FC(J)", "Fracture Circumferential at Joint", "Fracture Circumferential at Joint", 80.0, 4.0, "ICG", "Fractured", "Structure", "2"));
        list.add(Code.getCode("FIC", "FWCS", "FWCS", "Flow Incoming Wrong Pipe Clear (Storm)", "Flow Incoming Wrong Pipe Clear (Storm)", 0.0, 0.0, "ICG", "-", "Structure", "1"));
        list.add(Code.getCode("FIT", "FWTF", "FWTS", "Flow Incoming Wrong PipeTurbid (Foul)", "Flow Incoming Wrong PipeTurbid (Foul)", 0.0, 0.0, "ICG", "-", "Structure", "1"));
        list.add(Code.getCode("FL", "F L", "FL", "Fracture Longitudinal", "Fracture Longitudinal", 40.0, 3.0, "ICG", "Fractured", "Structure", "1"));
        list.add(Code.getCode("FLJ", "", "FL(J)", "Fracture Longitudinal at Joint", "Fracture Longitudinal at Joint", 80.0, 4.0, "ICG", "Fractured", "Structure", "1"));
        list.add(Code.getCode("FM", "F M", "FM", "Fractures Multiple (Complex* / Helical*)", "Fractures Multiple (Complex* / Helical*)", 80.0, 4.0, "ICG", "Fractured", "Structure", "25"));
        list.add(Code.getCode("FMJ", "", "FM(J)", "Fractures Multiple at Joint", "Fractures Multiple at Joint", 120.0, 4.0, "ICG", "Fractured", "Structure", "2"));
        list.add(Code.getCode("FS", "F S", "FS", "Fracture Spiral", "Fracture Spiral", 80.0, 4.0, "ICG", "Fractured", "Structure", "2"));
        list.add(Code.getCode("FSJ", "", "FS(J)", "Fracture Spiral at Joint", "Fracture Spiral at Joint", 120.0, 4.0, "ICG", "Fractured", "Structure", "2"));
        list.add(Code.getCode("HA", "H-1", "H-1", "Hole Above", "Hole Above", 80.0, 4.0, "ICG", "Hole", "Structure", "12"));
        list.add(Code.getCode("HAJ", "", "", "Hole Above at Joint", "Hole Above at Joint", 120.0, 4.0, "ICG", "Hole", "Structure", "12"));
        list.add(Code.getCode("HB", "H-2", "H-2", "Hole Below", "Hole Below", 120.0, 4.0, "ICG", "Hole", "Structure", "12"));
        list.add(Code.getCode("HBJ", "", "", "Hole Below at Joint", "Hole Below at Joint", 165.0, 5.0, "ICG", "Hole", "Structure", "12"));
        list.add(Code.getCode("INF", "ING F", "INGF", "Ingress of Fine + %", "Ingress of Fine #1", 80.0, 4.0, "ICG", "Ingress", "Structure", "1234"));
        list.add(Code.getCode("INFJ", "", "ING F (J)", "Ingress of Fine at Joint", "Ingress of Fine at Joint #1", 120.0, 4.0, "ICG", "Ingress", "Structure", "1234"));
        list.add(Code.getCode("ING", "ING G", "INGG", "Ingress of Gravel + %", "Ingress of Gravel #1", 80.0, 4.0, "ICG", "Ingress", "Structure", "1234"));
        list.add(Code.getCode("INGJ", "", "ING G (J)", "Ingress of Gravel at Joint", "Ingress of Gravel at Joint #1", 120.0, 4.0, "ICG", "Ingress", "Structure", "1234"));
        list.add(Code.getCode("INP", "", "INGP", "Ingress of Peat + %", "Ingress of Peat #1", 80.0, 4.0, "ICG", "Ingress", "Structure", "1234"));
        list.add(Code.getCode("INPJ", "", "ING P (J)", "Ingress of Peat at Joint", "Ingress of Peat at Joint #1", 120.0, 4.0, "ICG", "Ingress", "Structure", "1234"));
        list.add(Code.getCode("INS", "ING S", "INGS", "Ingress of Sand + %", "Ingress of Sand #1", 80.0, 4.0, "ICG", "Ingress", "Structure", "1234"));
        list.add(Code.getCode("INSJ", "", "ING S (J)", "Ingress of Sand at Joint", "Ingress of Sand at Joint #1", 120.0, 4.0, "ICG", "Ingress", "Structure", "1234"));
        list.add(Code.getCode("INZ", "ING Z", "INGZ+", "Ingress of Other + %", "Ingress of Other #1", 80.0, 4.0, "ICG", "Ingress", "Structure", "12345"));
        list.add(Code.getCode("INZJ", "", "ING Z (J)", "Ingress of Other at Joint", "Ingress of Other at Joint #1", 120.0, 4.0, "ICG", "Ingress", "Structure", "12345"));
        list.add(Code.getCode("JDL", "JD (L)", "JD(L)", "Joint Displaced Large >1.5 pipe thickness", "Joint Displaced Large (>1.5 pipe thickness)", 40.0, 3.0, "ICG", "Joint Displaced", "Structure", "2"));
        list.add(Code.getCode("JDM", "JD (M)", "JD(M)", "Joint Displaced Medium <1.5 pipe thickness", "Joint Displaced Medium (<1.5 pipe thickness)", 20.0, 2.0, "ICG", "Joint Displaced", "Structure", "2"));
        list.add(Code.getCode("MB", "MB", "MB", "Missing Bricks Single", "Missing Bricks Single", 80.0, 4.0, "ICG", "-", "Structure", "2"));
        list.add(Code.getCode("ML", "MM-1", "MMT", "Mortar loss (Large) >50mm", "Mortar loss Large (>50mm)", 40.0, 3.0, "ICG", "-", "Structure", "2"));
        list.add(Code.getCode("MM", "MM-2", "MMM", "Mortar loss (Medium) 15-50mm", "Mortar loss Medium (15-50mm)", 20.0, 2.0, "ICG", "-", "Structure", "2"));
        list.add(Code.getCode("MS", "MM-3", "MMS", "Mortar loss (Slight) <15mm", "Mortar loss Slight (<15mm)", 5.0, 1.0, "ICG", "-", "Structure", "2"));
        list.add(Code.getCode("OJL", "OJ (L)", "OJ(L)", "Open Joint Large >1.5 Pipe thickness", "Open Joint Large (>1.5 Pipe thickness)", 40.0, 3.0, "ICG", "Open Joint", "Structure", ""));
        list.add(Code.getCode("OJM", "OJ (M)", "OJ(M)", "Open Joint Medium 1-1.5 Pipe thickness", "Open Joint Medium (1-1.5 Pipe thickness)", 20.0, 2.0, "ICG", "Open Joint", "Structure", ""));
        list.add(Code.getCode("SRB", "SR B", "SRB", "Sealing Ring Broken", "Sealing Ring Broken", 80.0, 4.0, "ICG", "-", "Structure", "12"));
        list.add(Code.getCode("SRI", "SR", "SR", "Sealing Ring Intruding", "Sealing Ring Intruding", 80.0, 4.0, "ICG", "-", "Structure", "12"));
        list.add(Code.getCode("SRZ", "S O", "SO+", "Other Sealant Intruding", "Other Sealant Intruding", 10.0, 2.0, "ICG", "-", "Structure", "125"));
        list.add(Code.getCode("SSL", "SS-1", "", "Surface Damage - Spalling Large (Deep voids)", "Surface Damage - Spalling Large (Deep voids)", 40.0, 3.0, "ICG", "Surface Spalling / Wear", "Structure", "23"));
        list.add(Code.getCode("SSM", "SS-2", "SS-1", "Surface Damage - Spalling Medium (Aggregate)", "Surface Damage - Spalling Medium (Aggregate)", 20.0, 2.0, "ICG", "Surface Spalling / Wear", "Structure", "23"));
        list.add(Code.getCode("SSS", "SS-3", "SS-2", "Surface Damage - Spalling Small(Surface exposed)", "Surface Damage - Spalling Small(Surface exposed)", 5.0, 1.0, "ICG", "Surface Spalling / Wear", "Structure", "23"));
        list.add(Code.getCode("SWL", "SW-1", "SW-1", "Surface Damage - Wear, Increased Roughness. Large (Deep voids)", "Surface Damage - Wear, Increased Roughness. Large (Deep voids)", 40.0, 3.0, "ICG", "Surface Spalling / Wear", "Structure", "23"));
        list.add(Code.getCode("SWM", "SW-2", "SW-2", "Surface Damage - Wear, Increased Roughness. Media (Aggregate)", "Surface Damage - Wear, Increased Roughness. Media (Aggregate)", 20.0, 2.0, "ICG", "Surface Spalling / Wear", "Structure", "23"));
        list.add(Code.getCode("SWS", "SW-3", "SW-3", "Surface Damage - Wear, Increased Roughness. Small (Surface exposed)", "Surface Damage - Wear, Increased Roughness. Small (Surface exposed)", 5.0, 1.0, "ICG", "Surface Spalling / Wear", "Structure", "23"));
        list.add(Code.getCode("SV", "SV", "SV", "Soil Visible Beyond Defect", "Soil Visible Beyond Defect", 40.0, 3.0, "ICG", "-", "Structure", "12"));
        list.add(Code.getCode("SVJ", "", "", "Soil Visible Beyond Defect at Joint", "Soil Visible Beyond Defect at Joint", 80.0, 4.0, "ICG", "-", "Structure", "12"));
        list.add(Code.getCode("VV", "VV", "VV", "Void Visible Beyond Defect", "Void Visible Beyond Defect", 80.0, 4.0, "ICG", "-", "Structure", "12"));
        list.add(Code.getCode("VVJ", "", "", "Void Visible Beyond Defect at Joint", "Void Visible Beyond Defect at Joint", 120.0, 4.0, "ICG", "-", "Structure", "12"));
        list.add(Code.getCode("XB", "X B", "XB", "Collapse Brickwork / Masonry", "Collapse Brickwork / Masonry", 165.0, 5.0, "ICG", "Collapsed", "Structure", ""));
        list.add(Code.getCode("XBJ", "", "", "Collapse Brickwork / Masonry at Joint", "Collapse Brickwork / Masonry at Joint", 165.0, 5.0, "ICG", "Collapsed", "Structure", ""));
        list.add(Code.getCode("XP", "X P", "XP", "Collapse Pipework", "Collapse Pipework", 165.0, 5.0, "ICG", "Collapsed", "Structure", ""));

        list.add(Code.getCode("CN", "CN", "CN", "Connection", "Connection", 0.0, 0.0, "ICG", "Connection", "Junction and Connection", "14"));
        list.add(Code.getCode("CNJ", "", "", "Connection at Joint", "Connection at Joint", 0.0, 0.0, "ICG", "Connection", "Junction and Connection", "14"));
        list.add(Code.getCode("CXB", "CX B", "CXB(I)", "Connection Defective Pipe Blocked", "Connection Defective Pipe Blocked, Dia. #2", 80.0, 4.0, "ICG", "Connection", "Junction and Connection", "145"));
        list.add(Code.getCode("CXBJ", "", "", "Connection Defective Pipe Blocked at Joint", "Connection Defective Pipe Blocked at Joint, Dia. #2", 120.0, 4.0, "ICG", "Connection", "Junction and Connection", "145"));
        list.add(Code.getCode("CXD", "CX D", "CXD(I)", "Connection Defective Pipe Damaged", "Connection Defective Pipe Damaged, Dia. #2", 80.0, 4.0, "ICG", "Connection", "Junction and Connection", "14"));
        list.add(Code.getCode("CXDJ", "", "", "Connection Defective Pipe Damaged at Joint", "Connection Defective Pipe Damaged at Joint, Dia. #2", 120.0, 4.0, "ICG", "Connection", "Junction and Connection", "14"));
        list.add(Code.getCode("CXI", "CX I", "CXI", "Connection Defective Pipe Intruding", "Connection Defective Pipe Intruding #1", 80.0, 4.0, "ICG", "Connection", "Junction and Connection", "134"));
        list.add(Code.getCode("CXIJ", "", "", "Connection Defective Pipe Intruding at Joint", "Connection Defective Pipe Intruding at Joint #1", 165.0, 5.0, "ICG", "Connection", "Junction and Connection", "134"));
        list.add(Code.getCode("CXP", "CX P", "CXP(I)", "Connection Defective Position Incorrect", "Connection Defective Position Incorrect", 80.0, 4.0, "ICG", "Connection", "Junction and Connection", "14"));
        list.add(Code.getCode("CXPJ", "", "", "Connection Defective Position Incorrect at Joint", "Connection Defective Position Incorrect at Joint", 120.0, 4.0, "ICG", "Connection", "Junction and Connection", "14"));
        list.add(Code.getCode("CXZ", "CX Z", "CXZ", "Connection Defective Other", "Connection Defective Other", 80.0, 4.0, "ICG", "Connection", "Junction and Connection", "145"));
        list.add(Code.getCode("CXZJ", "", "", "Connection Defective Other at Joint", "Connection Defective Other at Joint", 120.0, 4.0, "ICG", "Connection", "Junction and Connection", "145"));
        list.add(Code.getCode("JN", "JN", "JN", "Junction", "Junction", 0.0, 0.0, "ICG", "Junction", "Junction and Connection", "14"));
        list.add(Code.getCode("JNJ", "", "", "Junction at Joint", "Junction at Joint", 0.0, 0.0, "ICG", "Junction", "Junction and Connection", "14"));
        list.add(Code.getCode("JXB", "JX B", "JXB", "Junction Defective Pipe Blocked", "Junction Defective Pipe Blocked", 80.0, 4.0, "ICG", "Junction", "Junction and Connection", "14"));
        list.add(Code.getCode("JXBJ", "", "", "Junction Defective Pipe Blocked at Joint", "Junction Defective Pipe Blocked at Joint", 120.0, 4.0, "ICG", "Junction", "Junction and Connection", "14"));
        list.add(Code.getCode("JXD", "JX D", "JXD", "Junction Defective Pipe Damaged", "Junction Defective Pipe Damaged", 80.0, 4.0, "ICG", "Junction", "Junction and Connection", "14"));
        list.add(Code.getCode("JXDJ", "", "", "Junction Defective Pipe Damaged at Joint", "Junction Defective Pipe Damaged at Joint", 120.0, 4.0, "ICG", "Junction", "Junction and Connection", "14"));
        list.add(Code.getCode("JXP", "JX P", "JXP", "Junction Defective Position Incorrect", "Junction Defective Position Incorrect", 80.0, 4.0, "ICG", "Junction", "Junction and Connection", "14"));
        list.add(Code.getCode("JXPJ", "", "", "Junction Defective Position Incorrect at Joint", "Junction Defective Position Incorrect at Joint", 120.0, 4.0, "ICG", "Junction", "Junction and Connection", "14"));
        list.add(Code.getCode("JXZ", "JX Z", "JXZ+", "Junction Defective Others", "Junction Defective Others", 80.0, 4.0, "ICG", "Junction", "Junction and Connection", "145"));
        list.add(Code.getCode("JXZJ", "", "", "Junction Defective Others at Joint", "Junction Defective Others at Joint", 120.0, 4.0, "ICG", "Junction", "Junction and Connection", "145"));

        list.add(Code.getCode("LWC", "LX WC", "LXWC", "Lining Defect - Circumferential Wrinkling", "Lining Defect - Circumferential Wrinkling", 20.0, 2.0, "ICG", "Lining Defect", "Repair Defective", "2"));
        list.add(Code.getCode("LWL", "LX WL", "LXWL", "Lining Defect - Long. Wrinkling", "Lining Defect - Long. Wrinkling", 5.0, 1.0, "ICG", "Lining Defect", "Repair Defective", "1"));
        list.add(Code.getCode("LWS", "LXWM", "LXWH", "Lining Defect - Spiral Wrinkling", "Lining Defect - Spiral Wrinkling", 20.0, 2.0, "ICG", "Lining Defect", "Repair Defective", "2"));
        list.add(Code.getCode("LWM", "", "LXWM", "Lining Defect - Multiple Wrinkling", "Lining Defect - Multiple Wrinkling", 20.0, 2.0, "ICG", "Lining Defect", "Repair Defective", "2"));
        list.add(Code.getCode("LXB", "LX B", "LXB", "Lining Defect - Blistered", "Lining Defect - Blistered", 5.0, 1.0, "ICG", "Lining Defect", "Repair Defective", "2"));
        list.add(Code.getCode("LXC", "LX C", "LXC", "Lining Defect - Discoloured", "Lining Defect - Discoloured", 5.0, 1.0, "ICG", "Lining Defect", "Repair Defective", "2"));
        list.add(Code.getCode("LXD", "LX D", "LXD", "Lining Defect - Detached", "Lining Defect - Detached", 165.0, 5.0, "ICG", "Lining Defect", "Repair Defective", "2"));
        list.add(Code.getCode("LXE", "LX E", "LXE", "Lining Defect - Defective End", "Lining Defect - Defective End", 165.0, 5.0, "ICG", "Lining Defect", "Repair Defective", "2"));
        list.add(Code.getCode("LXZ", "LX Z", "LXZ+", "Lining Defect - Other", "Lining Defect - Other", 5.0, 1.0, "ICG", "Lining Defect", "Repair Defective", "25"));
        list.add(Code.getCode("RXM", "RX M", "RXM", "Defective Repair - Wall Missing", "Defective Repair - Wall Missing", 165.0, 5.0, "ICG", "Defective Repair", "Repair Defective", "2"));
        list.add(Code.getCode("RXZ", "RX Z", "RXZ+", "Defective Repair - Other", "Defective Repair - Other", 50.0, 3.0, "ICG", "Defective Repair", "Repair Defective", "25"));
        list.add(Code.getCode("WXC", "WX C", "WXC", "Weld Failure - Circumferential", "Weld Failure - Circumferential", 165.0, 5.0, "ICG", "Weld Failure", "Repair Defective", "2"));
        list.add(Code.getCode("WXL", "WX L", "WXL", "Weld Failure - Longitudinal", "Weld Failure - Longitudinal", 80.0, 4.0, "ICG", "Weld Failure", "Repair Defective", "1"));
        list.add(Code.getCode("WXS", "WX S", "WXS", "Weld Failure - Spiral", "Weld Failure - Spiral", 165.0, 5.0, "ICG", "Weld Failure", "Repair Defective", "2"));

        list.add(Code.getCode("BR", "B R", "BR", "Major Branch No. MH + Reference Number", "Major Branch No. Manhole", 0.0, 0.0, "Misc", "Major Branch", "Nodes", "5"));
        list.add(Code.getCode("BRF", "", "BRF", "Major Branch No. MH, + Reference Number", "Major Branch No. Manhole", 0.0, 0.0, "Misc", "Major Branch", "Nodes", "5"));
        list.add(Code.getCode("CP", "C P", "CP", "Catchpit + Reference Number", "Catchpit", 0.0, 0.0, "Misc", "Catchpit", "Nodes", "5"));
        list.add(Code.getCode("CPF", "", "CPF", "Catchpit + Reference Number", "Catchpit", 0.0, 0.0, "Misc", "Catchpit", "Nodes", "5"));
        list.add(Code.getCode("GY", "G Y", "GY", "Gully + Reference Number", "Gully", 0.0, 0.0, "Misc", "Gully", "Nodes", "5"));
        list.add(Code.getCode("GYF", "", "GYF", "Gully + Reference Number", "Gully", 0.0, 0.0, "Misc", "Gully", "Nodes", "5"));
        list.add(Code.getCode("IC", "I C", "IC", "Inspection Chamber + Reference Number", "Inspection Chamber", 0.0, 0.0, "Misc", "Chamber", "Nodes", "5"));
        list.add(Code.getCode("ICF", "", "ICF", "Inspection Chamber + Reference Number", "Inspection Chamber", 0.0, 0.0, "Misc", "Chamber", "Nodes", "5"));
        list.add(Code.getCode("LH", "L H", "LH", "Lamphole + Reference Number", "Lamphole", 0.0, 0.0, "Misc", "Lamphole", "Nodes", "5"));
        list.add(Code.getCode("LHF", "", "LHF", "Lamphole + Reference Number", "Lamphole", 0.0, 0.0, "Misc", "Lamphole", "Nodes", "5"));
        list.add(Code.getCode("MH", "MH", "MH", "Manhole + Reference Number", "Manhole", 0.0, 0.0, "Misc", "Manhole", "Nodes", "5"));
        list.add(Code.getCode("MHF", "", "MHF", "Manhole + Reference Number", "Manhole", 0.0, 0.0, "Misc", "Manhole", "Nodes", "5"));
        list.add(Code.getCode("OF", "O F", "OF", "Outfall + Reference Number", "Outfall", 0.0, 0.0, "Misc", "Outfall", "Nodes", "5"));
        list.add(Code.getCode("OFF", "", "OFF", "Outfall + Reference Number", "Outfall ", 0.0, 0.0, "Misc", "Outfall ", "Nodes", "5"));
        list.add(Code.getCode("OS", "O S", "OS", "Oil Separator + Reference Number", "Oil Separator", 0.0, 0.0, "Misc", "Oil Separator", "Nodes", "5"));
        list.add(Code.getCode("OSF", "", "OSF", "Oil Separator + Reference Number", "Oil Separator", 0.0, 0.0, "Misc", "Oil Separator", "Nodes", "5"));
        list.add(Code.getCode("RE", "R E", "RE", "Rodding Eye + Reference Number", "Rodding Eye ", 0.0, 0.0, "Misc", "Rodding Eye ", "Nodes", "5"));
        list.add(Code.getCode("REF", "", "REF", "Rodding Eye + Reference Number", "Rodding Eye", 0.0, 0.0, "Misc", "Rodding Eye", "Nodes", "5"));
        list.add(Code.getCode("SK", "SK", "SK", "Soakaway + Reference Number", "Soakaway", 0.0, 0.0, "Misc", "Soakaway", "Nodes", "5"));
        list.add(Code.getCode("SKF", "", "SKF", "Soakaway + Reference Number", "Soakaway ", 0.0, 0.0, "Misc", "Soakaway ", "Nodes", "5"));
        list.add(Code.getCode("CZ", "O C", "OC", "Other Chamber + Reference Number", "Other Chamber", 0.0, 0.0, "Misc", "Other Chamber", "Nodes", "5"));
        list.add(Code.getCode("OCF", "", "OCF", "Other Chamber + Reference Number", "Other Chamber", 0.0, 0.0, "Misc", "Other Chamber", "Nodes", "5"));

        list.add(Code.getCode("SC", "SC-1", "SC-1", "Shape Change + New Code", "Shape Change", 0.0, 0.0, "SCG", "-", "Miscel-laneous", "5"));
        list.add(Code.getCode("DC", "SC-2", "SC-2", "Dimension Change + Size", "Dimension Change", 0.0, 0.0, "Misc", "-", "Miscel-laneous", ""));
        list.add(Code.getCode("MC", "M C", "MC+", "Material Change", "Material Change", 0.0, 0.0, "Misc", "-", "Miscel-laneous", ""));
        list.add(Code.getCode("ME", "", "ME&", "Methane - % / ppm", "Methane - % / ppm", 0.0, 0.0, "Misc", "-", "Miscel-laneous", ""));
        list.add(Code.getCode("OD", "", "OD&", "Oxygen Deficiency - % / ppm", "Oxygen Deficiency - % / ppm", 0.0, 0.0, "Misc", "-", "Miscel-laneous", ""));
        list.add(Code.getCode("PC", "P C", "PC", "Pipe Unit Length Change", "Pipe Unit Length Change", 0.0, 0.0, "Misc", "-", "Miscel-laneous", "5"));
        list.add(Code.getCode("FH", "", "", "Finish Survey", "Finish Survey", 0.0, 0.0, "Misc", "-", "Miscel-laneous", ""));
        list.add(Code.getCode("FHT", "", "", "Finish Survey - U-Trap", "Finish Survey - U-Trap", 0.0, 0.0, "Misc", "-", "Miscel-laneous", "5"));
        list.add(Code.getCode("GP", "G P", "GP", "General Photograph", "General Photograph", 0.0, 0.0, "SCG", "-", "Miscel-laneous", ""));
        list.add(Code.getCode("GO", "", "", "General Observation (10m / Joint)", "General Observation (10m / Joint)", 0.0, 0.0, "Misc", "-", "Miscel-laneous", "5"));
        list.add(Code.getCode("GZ", "", "GZ&", "Other - % / ppm", "Other - % / ppm", 0.0, 0.0, "Misc", "-", "Miscel-laneous", ""));
        list.add(Code.getCode("HS", "", "HS&", "Hydrogen Sulphide - % / ppm ", " Hydrogen Sulphide - % /ppm ", 0.0, 0.0, " Misc ", " - ", " Miscel-laneous", ""));
        list.add(Code.getCode("LC", "", "LC", "Line Change", "Line Change", 0.0, 0.0, "SCG", "Line", "Miscel-laneous", "5"));
        list.add(Code.getCode("LD", "L D", "LD", "Line Deviates Down", "Line Deviates Down", 0.0, 0.0, "SCG", "Line", "Miscel-laneous", ""));
        list.add(Code.getCode("LL", "L L", "LL", "Line Deviates Left", "Line Deviates Left", 0.0, 0.0, "SCG", "Line", "Miscel-laneous", ""));
        list.add(Code.getCode("LR", "L R", "LR", "Line Deviates Right", "Line Deviates Right", 0.0, 0.0, "SCG", "Line", "Miscel-laneous", ""));
        list.add(Code.getCode("LU", "L U", "LU", "Line Deviates Up", "Line Deviates Up", 0.0, 0.0, "SCG", "Line", "Miscel-laneous", ""));
        list.add(Code.getCode("PP", "PP", "PP", "Porous Pipe / Subsoil pipe", "Porous Pipe / Subsoil pipe", 0.0, 0.0, "SCG", "-", "Miscel-laneous", ""));
        list.add(Code.getCode("REM", "", "PEM", "Remarks General / Comment", "Remarks General / Comment", 0.0, 0.0, "SCG", "-", "Miscel-laneous", "5"));
        list.add(Code.getCode("SA", "#4", "SA+", "Survey Abandoned", "Survey Abandoned", 0.0, 0.0, "Misc", "Survey Abandoned", "Miscel-laneous", ""));
        list.add(Code.getCode("SAA", "#4-1", "", "Survey Abandoned - Out of Survey Area", "Survey Abandoned - Out of Survey Area", 0.0, 0.0, "Misc", "Survey Abandoned", "Miscel-laneous", "5"));
        list.add(Code.getCode("SAC", "#4-2", "", "Survey Abandoned - Complete from next side", "Survey Abandoned - Complete from next side", 0.0, 0.0, "Misc", "Survey Abandoned", "Miscel-laneous", "5"));
        list.add(Code.getCode("SAD", "#4-3", "", "Survey Abandoned - Defect", "Survey Abandoned - Defect", 0.0, 0.0, "Misc", "Survey Abandoned", "Miscel-laneous", "5"));
        list.add(Code.getCode("SAS", "#4-4", "", "Survey Abandoned - Seal Pipe", "Survey Abandoned - Seal Pipe", 0.0, 0.0, "Misc", "Survey Abandoned", "Miscel-laneous", "5"));
        list.add(Code.getCode("SAT", "#4-5", "", "Survey Abandoned - U-Trap", "Survey Abandoned - U-Trap", 0.0, 0.0, "Misc", "Survey Abandoned", "Miscel-laneous", "5"));
        list.add(Code.getCode("SAZ", "", "", "Survey Abandoned - Others", "Survey Abandoned - Others", 0.0, 0.0, "Misc", "Survey Abandoned", "Miscel-laneous", "5"));
        list.add(Code.getCode("ST", "", "", "Start Survey", "Start Survey", 0.0, 0.0, "Misc", "-", "Miscel-laneous", "4"));
        list.add(Code.getCode("WL", "", "WL", "Water Level %", "Water Level #1", 0.0, 0.0, "SCG", "Water Line", "Miscel-laneous", "3"));
        list.add(Code.getCode("WLC", "WL C", "WLC", "Water Level - Clear %", "Water Level - Clear #1", 0.0, 0.0, "SCG", "Water Line", "Miscel-laneous", "3"));
        list.add(Code.getCode("WLT", "WL T", "WLT", "Water Level - Turbid %", "Water Level - Turbid #1", 0.0, 0.0, "SCG", "Water Line", "Miscel-laneous", "3"));
        list.add(Code.getCode("VR", "V R", "VR", "Vermin - Rat", "Vermin - Rat", 0.0, 0.0, "SCG", "-", "Miscel-laneous", ""));
        list.add(Code.getCode("VS", "", "", "Vermin", "Vermin", 0.0, 0.0, "SCG", "-", "Miscel-laneous", ""));
        list.add(Code.getCode("VVR", "VVR", "VVR", "Video Volume Reference", "Video Volume Reference", 0.0, 0.0, "SCG", "-", "Miscel-laneous", "5"));
        list.add(Code.getCode("VZ", "V Z", "", "Vermin - Other", "Vermin - Other", 0.0, 0.0, "SCG", "-", "Miscel-laneous", "5"));

        list.add(Code.getCode("RPH", "RP H", "RPH", "Point Repair - Hole Repaired", "Point Repair - Hole Repaired", 0.0, 0.0, "Misc", "Point Repair", "Repair Points", "2"));
        list.add(Code.getCode("RPI", "RP I", "RPI", "Point Repair - Injected Mortar", "Point Repair - Injected Mortar", 0.0, 0.0, "Misc", "Point Repair", "Repair Points", "2"));
        list.add(Code.getCode("RPL", "RP L", "RPL", "Point Repair - Localised Lining", "Point Repair - Localised Lining", 0.0, 0.0, "Misc", "Point Repair", "Repair Points", "2"));
        list.add(Code.getCode("RPP", "", "", "Repair Point - Patch Repaired", "Repair Point - Patch Repaired", 0.0, 0.0, "Misc", "Point Repair", "Repair Points", "2"));
        list.add(Code.getCode("RPR", "RP R", "RPR", "Point Repair - Pipe Replaced", "Point Repair - Pipe Replaced", 0.0, 0.0, "Misc", "Point Repair", "Repair Points", "2"));
        list.add(Code.getCode("RPS", "RP S", "RPS", "Point Repair - Other Sealing Material", "Point Repair - Other Sealing Material", 0.0, 0.0, "Misc", "Point Repair", "Repair Points", "25"));
        list.add(Code.getCode("RPZ", "RP Z", "RPZ", "Point Repair - Other Trenchless Method", "Point Repair - Other Trenchless Method", 0.0, 0.0, "Misc", "Point Repair", "Repair Points", "25"));

        return list;
    }

    public static List<Code> findList() {
        return initList();
    }

    public static Code findInfo(String code, String standard) {
        List<Code> list = initList();
        if (Objects.equals("HKCCEC 2009", standard))
            return list.stream().filter(value -> value.getCode1().equals(code)).findFirst().orElse(null);
        if (Objects.equals("MSCC 2004", standard))
            return list.stream().filter(value -> value.getCode2().equals(code)).findFirst().orElse(null);
        if (Objects.equals("MSCC 2013", standard))
            return list.stream().filter(value -> value.getCode3().equals(code)).findFirst().orElse(null);
        return null;
    }

    public static String convert(String iCode, String standard1, String standard2) {
        Code code = findInfo(iCode, standard1);
        if (code != null && Objects.equals(standard2, "HKCCEC 2009"))
            return code.getCode1();
        if (code != null && Objects.equals(standard2, "MSCC 2004"))
            return code.getCode2();
        if (code != null && Objects.equals(standard2, "MSCC 2013"))
            return code.getCode3();
        return null;
    }

}
